package com.itheima.domain;
//这是一个教师子类;他继承person父类
public class Teacher extends Person {
    //构造方法不能继承,所以需要重新编写构造方法;

    public Teacher() {
    }

    public Teacher(int id, String name, String sex, String birthday, int age) {
        super(id, name, sex, birthday, age);
    }

    @Override
    public String getType() {
        String s = "教师";
        return s;
    }

    @Override
    public String getWork() {
        String s = "教书育人";
        return s;
    }
    //由于父类是一个抽象类,所以需要重写父类的抽象方法;

}
